
<template>
    <VcUpload ref="uploadRef" :limit="2" :action="'/api/upload'" v-model="list" :auto-upload="false" @all-upload="allUpload"></VcUpload>
    <el-button type="success" @click="submitUpload">
      提交
    </el-button>
</template>
<script setup lang="ts">
import { ref } from 'vue'
import type { UploadInstance } from 'element-plus'

const list = ref([])
const uploadRef = ref<UploadInstance>()
const submitUpload = () => {
  uploadRef.value?.submit()
}
const allUpload = () =>{
  console.log(`所有文件上传成功`)
}
</script>